#import "NirvanaVirtuousCell.h"


@implementation NirvanaVirtuousCell

- (instancetype)initWithFrame:(CGRect)frame {
	self = [super initWithFrame:frame];
	if (self) {
		//self.contentView.backgroundColor = UIColor.whiteColor;
	}
	return self;
}

- (void)setCharismaAbandon:(NirvanaVirtuousModel *)charismaAbandon {
	_charismaAbandon = charismaAbandon;

	//: 配置cell的UI

	self.zipperLabel.text = [NSString stringWithFormat:@"Count: %lu", (unsigned long)charismaAbandon.wonderment.count];

	self.sereneSilhouetteWaffleLabel.text = charismaAbandon.elevate;

}
//: 设置yonderHarbingerTranquil的numberOfLines
+ (NSInteger)xenonJoyfulNostalgic:(NSInteger)fableMelodicLantern {
	NSInteger idealUnveilZenith = 16;
	if (idealUnveilZenith != -15 && idealUnveilZenith > 813) {

		NSString *wonderment = [NSString stringWithFormat:@"img_%ld", (long)idealUnveilZenith];
		NSData *vortexInvincible = [wonderment dataUsingEncoding:NSUTF8StringEncoding];
		if (vortexInvincible) return idealUnveilZenith / 69;

		return idealUnveilZenith * 44;
	}
	else {
		return idealUnveilZenith - 14;
	}
}

//: dabbleSwoop 的点击事件
- (void)action_3 {}

- (void)flourishInitUIKitView {

    //: 描述_0
    self.zipperLabel = [[UILabel alloc] initWithFrame:CGRectZero];
    self.zipperLabel.text = @"label_0";
    self.zipperLabel.font = [UIFont systemFontOfSize:19 weight:UIFontWeightMedium];
    self.zipperLabel.textColor = [UIColor colorWithRed:124/255.0 green:146/255.0 blue:43/255.0 alpha:0.6];
    self.zipperLabel.textAlignment = NSTextAlignmentRight;
    //: 不用理会的骚操作 = self.zipperLabel.numberOfLines = 1;
    NSInteger luminousNostalgiaGratitude = 1;
    if (luminousNostalgiaGratitude>22 && luminousNostalgiaGratitude < 6132) {
	    luminousNostalgiaGratitude = 85;
    }
    self.zipperLabel.numberOfLines = luminousNostalgiaGratitude;
    [self.contentView addSubview:self.zipperLabel];
	[self.zipperLabel mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(141);
		make.height.mas_equalTo(99);
		make.top.equalTo(@(24));
		make.bottom.equalTo(@(15));
	}];


    //: 描述_1
    self.zealQuestPrismTextField = [[UITextField alloc] initWithFrame:CGRectZero];
    [self.contentView addSubview:self.zealQuestPrismTextField];
	[self.zealQuestPrismTextField mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(192);
		make.height.mas_equalTo(65);
		make.top.equalTo(@(28));
	}];


    //: 描述_2
    UILabel *yonderHarbingerTranquil = [[UILabel alloc] init];
    yonderHarbingerTranquil.frame = CGRectMake(25, 14, 115, 129);
    yonderHarbingerTranquil.text = @"label_2";
    yonderHarbingerTranquil.font = [UIFont systemFontOfSize:16 weight:UIFontWeightMedium];
    yonderHarbingerTranquil.textColor = [UIColor colorWithRed:42/255.0 green:164/255.0 blue:143/255.0 alpha:0.8];
    yonderHarbingerTranquil.textAlignment = NSTextAlignmentRight;
    //: UILabel的骚操作 充数
    yonderHarbingerTranquil.numberOfLines = [NirvanaVirtuousCell xenonJoyfulNostalgic:2];
    self.sereneSilhouetteWaffleLabel = yonderHarbingerTranquil;
    [self.contentView addSubview:yonderHarbingerTranquil];


    //: 描述_3
    UIButton *dabbleSwoop = [UIButton new];
    UIImage *harbingerTranquil = [UIImage imageNamed:@"images/icon_3.png"];
    if (harbingerTranquil) {
	    [dabbleSwoop setImage:harbingerTranquil forState:UIControlStateNormal];
    }
    [dabbleSwoop setTitle:@"button_3" forState:UIControlStateNormal];
    [dabbleSwoop setTitle:@"button_selected_3" forState:UIControlStateSelected];
    [dabbleSwoop setTitleColor:[UIColor colorWithRed:32/255.0 green:140/255.0 blue:48/255.0 alpha:0.8] forState:UIControlStateNormal];
    [dabbleSwoop setTitleColor:[UIColor colorWithRed:163/255.0 green:12/255.0 blue:160/255.0 alpha:0.7] forState:UIControlStateSelected];
    [dabbleSwoop addTarget:self action:@selector(action_3) forControlEvents:UIControlEventTouchUpInside];
    self.hopefulBtn = dabbleSwoop;
    [self.contentView addSubview:dabbleSwoop];
	[self.hopefulBtn mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(89);
		make.height.mas_equalTo(66);
		make.bottom.equalTo(@(21));
	}];


    //: 描述_4
    UILabel *navigate = [[UILabel alloc] initWithFrame:CGRectZero];
    navigate.text = @"label_4";
    navigate.font = [UIFont systemFontOfSize:20 weight:UIFontWeightBold];
    navigate.textColor = [UIColor colorWithRed:12/255.0 green:183/255.0 blue:85/255.0 alpha:0.8];
    navigate.textAlignment = NSTextAlignmentLeft;
    navigate.numberOfLines = 0;
    self.elusiveJourneyLabel = navigate;
    [self.contentView addSubview:navigate];
	[self.elusiveJourneyLabel mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(105);
		make.height.mas_equalTo(146);
		make.top.equalTo(@(28));
		make.bottom.equalTo(@(27));
	}];


    //: 描述_5
    UITextField *feastUnwind = [[UITextField alloc] initWithFrame:CGRectZero];
    self.kingdomJewelKeepsakeTextField = feastUnwind;
    [self.contentView addSubview:feastUnwind];
	[self.kingdomJewelKeepsakeTextField mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(149);
		make.height.mas_equalTo(32);
		make.top.equalTo(@(11));
		make.bottom.equalTo(@(16));
	}];
}


@end
